home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / TOT_2.ARJ / DEMO.EXE / arc / DEMDR3.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-11  |  1KB  |  43 lines

  1. program DemoDirectoryThree;
  2. {demdr3 - a customized directory list}
  3.  
  4. Uses DOS, CRT,
  5.      totFAST, totLINK, totLIST;
  6.  
  7. Var
  8.    ListWin:  ListDirObj;
  9.    FileInfo: tFileInfo;
  10.  
  11. begin
  12.    Screen.Clear(white,'░'); {paint the screen}
  13.    with ListWin do
  14.    begin
  15.       Init;
  16.       SetTagging(false);
  17.       ReadFiles('*.*',AnyFile - directory); {exclude directories}
  18.       FileList^.Sort(1,true);               {sort in name order}
  19.       Win^.SetTitle(' Choose a file ');
  20.       Go;
  21.       Win^.Remove;
  22.       if (LastKey = 27) or (Lastkey = 600) then
  23.          writeln('You escaped!')
  24.       else
  25.       begin
  26.          writeln('You chose file '+GetHiString);
  27.          writeln(FileList^.GetLongStr(FileList^.ActiveNodePtr));
  28.          FileList^.GetFileRecord(FileInfo, FileList^.ActiveNodeNumber);
  29.          with FileInfo do
  30.          begin
  31.             writeln('Name:           ', FileName);
  32.             writeln('Attr:           ', Attr);
  33.             writeln('Packed Time:    ', Time);
  34.             writeln('Size:           ', Size);
  35.             writeln('Directory entry:',LoadID);
  36.          end;
  37.       end;
  38.       Done;
  39.    end;
  40. end.
  41.  
  42.  
  43.